package com.xcity.pomelo.response;

import com.xcity.db.entity.Player;
import com.xcity.game.activity.oneyuan.OneYuanActivityPool;
import com.xcity.game.activity.oneyuan.OneYuanActivityRecord;

import naga.x.net.impl.pomelo.PomeloMessage;
import naga.x.net.impl.pomelo.protocol.Message;

@PomeloMessage(type = Message.Type.RESPONSE)
public class OneYuanActivityResponse extends Response {
	
	private int phase; // 期号
	private int round; // 轮数
	private int poolMax; // 奖池最大金额
	private int poolVal; // 奖池当前累计金额
	private int myNum; // 我参与的人次
	
	public OneYuanActivityResponse(int serial, OneYuanActivityPool pool, Player player) {
		super(serial);
		this.phase = pool.getPhase();
		this.round = pool.getRound();
		this.poolMax = pool.getPoolMax();
		this.poolVal = pool.getPoolValue();
		OneYuanActivityRecord record = pool.getRecord(player.getId());
		if (record != null) {
			this.myNum = record.getNumber();
		}
	}

	public int getPhase() {
		return phase;
	}

	public void setPhase(int phase) {
		this.phase = phase;
	}

	public int getRound() {
		return round;
	}

	public void setRound(int round) {
		this.round = round;
	}

	public int getPoolMax() {
		return poolMax;
	}

	public void setPoolMax(int poolMax) {
		this.poolMax = poolMax;
	}

	public int getPoolVal() {
		return poolVal;
	}

	public void setPoolVal(int poolVal) {
		this.poolVal = poolVal;
	}

	public int getMyNum() {
		return myNum;
	}

	public void setMyNum(int myNum) {
		this.myNum = myNum;
	}
	
	

}
